package cn.tedu.submarine;

import javax.swing.*;

//炸弹
public class Bomb extends SeaObject{

    public Bomb(int x,int y){
        super(9,12,x,y,3);
    }

    public void move(){
        y += speed; //y+(向下)
    }

    //返回炸弹图片
    public ImageIcon getImage() {
        return Images.bomb;
    }

    public boolean isOutOfBounds(){
        return this.y >= World.HEIGHT; // 炸弹的y>=窗口的高，即为越界了
    }

}
